package com.wyg.composite.adapter;

import com.wyg.composite.duck.Goose;
import com.wyg.composite.duck.Quackable;

/**
 * @description:    适配器，将鹅的行为适配给鸭子
 * @author: WYG
 * @time: 2021/4/10 21:25
 */

public class GooseAdapter implements Quackable {
    private Goose goose;
    public GooseAdapter(Goose goose) {
        this.goose = goose;
    }
    @Override
    public void quack() {
        goose.honk();
    }
}
